package com.eagle.videoboot.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.eagle.videoboot.domain.entity.Bgm;
import com.eagle.videoboot.domain.vo.ResultVO;
import com.eagle.videoboot.service.IBgmService;
import com.eagle.videoboot.utils.ResultVOUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(value="背景音乐业务的接口", tags= {"背景音乐业务的controller"})
@RequestMapping("/bgm")
public class BgmController {
	
	@Autowired
	private IBgmService bgmServiceImpl;
	
	@ApiOperation(value="获取背景音乐列表", notes="获取背景音乐列表的接口")
	@PostMapping("/list")
	public ResultVO list() {
		QueryWrapper<Bgm> wrapper = new QueryWrapper<>();
		List<Bgm> list = bgmServiceImpl.list(wrapper);
		return ResultVOUtil.success(list);
	}
	
}
